package com.zdw.demo.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 微信订单表 实体
 */
@Data
@TableName("wechat_refund_history")
public class WechatRefundHistory implements Serializable {

    public static final String RKEY             = "rkey";
    public static final String REFUND_ID        = "refund_id";
    public static final String OUT_REFUND_NO    = "out_refund_no";
    public static final String OUT_TRADE_NO     = "out_trade_no";
    public static final String TRANSACTION_ID   = "transaction_id";
    public static final String REFUND_STATUS    = "refund_status";
    public static final String REFUND           = "refund";
    public static final String TOTAL            = "total";
    public static final String CREATE_USER_ID   = "create_user_id";
    public static final String CREATE_USER_NAME = "create_user_name";
    public static final String CREATE_TIME      = "create_time";
    public static final String UPDATE_USER_ID   = "update_user_id";
    public static final String UPDATE_USER_NAME = "update_user_name";
    public static final String UPDATE_TIME      = "update_time";

    public WechatRefundHistory(String out_refund_no, String refund_status, Date date) {
        this.out_refund_no = out_refund_no;
        this.refund_status = refund_status;
        this.create_time = date;
        this.update_time = date;
    }

    public WechatRefundHistory(String refund_id, String out_refund_no, String transaction_id, String out_trade_no, double refund, double total, String refund_status, Date date) {
        this.refund_id = refund_id;
        this.out_refund_no = out_refund_no;
        this.transaction_id = transaction_id;
        this.out_trade_no = out_trade_no;
        this.refund = refund;
        this.total = total;
        this.refund_status = refund_status;
        this.create_time = date;
        this.update_time = date;
    }

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer rkey;

    /**
     * 微信退款单号
     */
    private String refund_id;

    /**
     * 内部/商户退款单号
     */
    private String out_refund_no;

    /**
     * 商户订单号/内部订单号
     */
    private String out_trade_no;

    /**
     * 微信支付订单号
     */
    private String transaction_id;

    /**
     * 退款状态
     * SUCCESS：退款成功
     * CLOSED：退款关闭
     * PROCESSING：退款处理中
     * ABNORMAL：退款异常
     */
    private String refund_status;

    /**
     * 退款金额(本次退款的金额,并非总的退款金额)
     */
    private double refund;

    /**
     * 原始订单总金额
     */
    private double total;

    /**
     * 创建人ID
     */
    private String create_user_id;

    /**
     * 创建人名称
     */
    private String create_user_name;

    /**
     * 创建时间
     */
    private Date create_time;

    /**
     * 修改人ID
     */
    private String update_user_id;

    /**
     * 修改人名称
     */
    private String update_user_name;

    /**
     * 修改时间
     */
    private Date update_time;


}
